#include<bits/stdc++.h>
using namespace std;
int n,i,j,r[100005];
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin>>n;
    for(i=1;i<=n;i++){
        cin>>r[i];
    }
    r[n+1]=10000000;
    sort(r+1,r+n+1);
    i=1;j=1;
    while(i<=n&&j<=n){
        while(r[i]>=r[j]){
            j++;
        }
        i++;j++;
    }
    cout<<j-i;
    return 0;
}
